<template>
	<view class="detail">
		<topNav title="聚合记录"></topNav>
		<view class="list-warp">
			<view class="item">日期</view>
			<view class="item">金额（AGT）</view>
			<view class="item">状态</view>
		</view>
		<view class="list-warp" v-for="item in detailData" :key="item.add_time">
			<view class="item">{{item.add_time}}</view>
			<view class="item">{{item.usdt}}</view>
			<view class="item" :class="item.state==1?'green':''">{{item.state==1?'进行中':'已完成'}}</view>
		</view>
	</view>
</template>

<script>
	import topNav from 'components/top-nav/top-vue.vue';
	export default{
		data(){
			return {
				detailData:[]
			}
		},
		created() {
			this.$u.post('/api/ltc_record', {account_id:uni.getStorageSync('account_id')}).then(res=>{
				if(res.code==200){
					this.detailData = res.data;
				} else {
					this.$refs.uToast.show({
						title: res.message,
						type: 'error',
					})
				}
			})
		},
		components:{
			topNav:topNav
		}
	}
</script>

<style lang="scss" scoped>
	.detail{
		margin-top: 45rpx;
		padding:0 40rpx;
		.title{
			font-size: 24*2rpx;
			padding:20*2rpx;
		}
		.list-warp{
			display:flex;
			&:nth-child(2){
				margin-bottom:40rpx;
			}
			margin-bottom:20rpx;
			.item{
				color:rgba(255,255,255, 0.8);
				&:nth-child(1){
					flex:4
				}
				&:nth-child(2){
					flex:3
				}
				&:nth-child(3){
					flex:2
				}
				&.green{
					color: rgba(105,218,115,0.8);
				}
			}
		}
	}
</style>
